<!DOCTYPE html> 
<html lang="ja"> 
    <head> 
        <meta charset="utf-8"> 
        <title>Firefox で innerText を使えるようにする方法</title>
        
        <script type="text/javascript" src="./../src/tmlib.js"></script>
        <script>
            
            // innerText 対応 (moz では textContent なので innerText に統一)
            (function(){
                var temp = document.createElement("div");
                if (temp.innerText == undefined) {
                    Object.defineProperty(HTMLElement.prototype, "text", {
                        get: function()  { return this.textContent },
                        set: function(v) { this.textContent = v; }
                    });
                }
            })();
            
            window.onload = function() {
                var eInnerHTML = document.getElementById("innerHTML");
                var eInnerText = document.getElementById("innerText");
                
                eInnerHTML.innerHTML = "<strong>Hello, world!</storng>";
                eInnerText.innerText = "<strong>Hello, world!</storng>";
            };
            
        </script>

    </head>
    
    <body>
        <h1>Firefox で innerText を使えるようにする方法</h1>
        <table border=1>
            <tr>
                <th>innerHTML</th>
                <td id="innerHTML"></td>
            </tr>
            <tr>
                <th>innerText</th>
                <td id="innerText"></td>
            </tr>
        </table>
    </body>
</html>
